package com.tedu.egmybaits1.mapper;


import com.tedu.egmybaits1.pojo.Product;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface ProductMapper {
//    @Insert("INSERT INTO product(title,price,stock) " +
//            "VALUES(#{title},#{price},#{stock})")
    int insertProduct(Product product);

//    @Update("UPDATE product " +
//            "SET title=#{title},price=#{price},stock=#{stock} " +
//            "WHERE id=#{id}")
    int updateProductById(Product product);

//    @Delete("DELETE FROM product WHERE id=#{id}")
    int deleteProductById(Integer id);
}
